package com.cloudlead.commonData.vo;

import com.cloudlead.common.lang.persistence.AbstractIdEntity;

import com.cloudlead.commonData.action.validator.BasePortValidatorGroup.*;

import javax.validation.constraints.Size;
import com.cloudlead.common.lang.annotation.BelongsTos;
import com.cloudlead.common.lang.annotation.Domain;
import com.cloudlead.common.lang.annotation.Label;
import com.cloudlead.commonData.vo.Region;
import java.lang.String;
import javax.validation.constraints.NotNull;

/**
 * BasePort is a Codegen vo type
 */
@Label("BasePort")
@BelongsTos(values = {
	@com.cloudlead.common.lang.annotation.BelongsTo(property="city", rootField="cityId")
})
@Domain(domainClassName="com.cloudlead.commonData.entity.EBasePort")
public class BasePort extends AbstractIdEntity<String> {

    private static final long serialVersionUID =1138655871733L;    
    @Label("cityId")
    private Region city;

    @Size(max=24)
    @Label("id")
    @NotNull(groups={Update.class})
    private String id;

    @Size(max=100)
    @Label("portCode")
    private String portCode;

    @Size(max=100)
    @Label("portName")
    private String portName;

    public Region getCity() {
        return city;
    }

    public void setCity(Region city) {
        this.city = city;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPortCode() {
        return portCode;
    }

    public void setPortCode(String portCode) {
        this.portCode = portCode;
    }

    public String getPortName() {
        return portName;
    }

    public void setPortName(String portName) {
        this.portName = portName;
    }

    public String toString() {
         return String.format("BasePort { city : %s,id : %s,portCode : %s,portName : %s }",city,id,portCode,portName);
    }

}

